package com.yawn.zdweb.defect;

import com.yawn.zdweb.controller.entity.DefectExport;
import com.yawn.zdweb.controller.entity.RestResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "zd-defect", fallback = HistoricalServiceImpl.class)
public interface HistoricalService {

    @GetMapping("/his/started")
    RestResponse myStarted(@RequestParam("first") int first, @RequestParam("size") int size);

    @GetMapping("/his/finished")
    RestResponse myFinished(@RequestParam("first") int first, @RequestParam("size") int size);

    @GetMapping("/his/list")
    RestResponse listDefect(@RequestParam("proCode") String proCode, @RequestParam("first") int first, @RequestParam("size") int size);

    @GetMapping("/his/export")
    List<DefectExport> exportByPro(@RequestParam("proCode") String proCode);
}
